package coreentity

import (
	"core/coreinfo"
	"core/corestruct"
	"core/coreutil"
	"fmt"
	"reflect"
)

type HtUserRole struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	HtuserId int64                `json:"htuserId,string"                    gorm:"column:htuser_id;index;DEFAULT:0;not null;comment:用户编号;"`
	HtdeptId int64                `json:"htdeptId,string"                    gorm:"column:htdept_id;DEFAULT:0;not null;comment:机构编号;"`
	HtroleId int64                `json:"htroleId,string"                    gorm:"column:htrole_id;DEFAULT:0;not null;comment:角色编号;"`
	CrtDt    corestruct.MyTime    `json:"crtDt"                            gorm:"column:crt_dt;not null;comment:创建日期;"`
	CrtUid   int64                `json:"crtUid,string"                    gorm:"column:crt_uid;DEFAULT:0;not null;comment:创建人编号;"`
	CrtDid   int64                `json:"crtDid,string"                    gorm:"column:crt_did;DEFAULT:0;not null;comment:机构编号;"`
	EdtDt    corestruct.MyTime    `json:"edtDt"                            gorm:"column:edt_dt;not null;comment:修改日期;"`
	EdtUid   int64                `json:"edtUid,string"                    gorm:"column:edt_uid;DEFAULT:0;not null;comment:修改人编号;"`
	Gid      string               `json:"gid"                              gorm:"column:gid;DEFAULT:'';type:char(36);not null;comment:Gid;"`
	Deleted  corestruct.DeletedAt `json:"deleted"                          gorm:"column:deleted;DEFAULT:0;type:tinyint(1);not null;comment:删除标志;"`
}

func (p *HtUserRole) TableName() string {
	return "HtUserRole"
}

func HtUserRoleInit() {

	var mcls = &HtUserRole{}
	var m = &corestruct.MyClass{
		Name:     "用户角色表",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddEntity(m)
}

func init() {
	fmt.Println("htUserrole init")
}
